package com.appbase.custom.base;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Describe:
 * Created by Rance Rang on 2019-10-24.
 * <p>
 * Copyright (c) Tange.Inc All rights reserved.
 */
public class DefenceBean implements Parcelable {
    private String startTime;
    private  String endTime;
    private  int weekDays;
    private  int flag;
    private int  eventMask;
    public DefenceBean(){

    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public int getWeekDays() {
        return weekDays;
    }

    public void setWeekDays(int weekDays) {
        this.weekDays = weekDays;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

    public int getFlag() {
        return flag;
    }

    public void setEventMask(int eventMask) {
        this.eventMask = eventMask;
    }

    public int getEventMask() {
        return eventMask;
    }

    protected DefenceBean(Parcel in) {
        startTime = in.readString();
        endTime = in.readString();
        flag = in.readInt();
        weekDays = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(startTime);
        dest.writeString(endTime);
        dest.writeInt(flag);
        dest.writeInt(weekDays);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<DefenceBean> CREATOR = new Creator<DefenceBean>() {
        @Override
        public DefenceBean createFromParcel(Parcel in) {
            return new DefenceBean(in);
        }

        @Override
        public DefenceBean[] newArray(int size) {
            return new DefenceBean[size];
        }
    };

    public boolean isClosed(){
       return "00:00".equals(startTime)&&"00:00".equals(endTime);
    }

}
